Skip to content

fix(dash): detect rocm serve's default port in chat auto-detect - #88

Merged
michaelroy-amd merged 1 commit into
mainfrom
EAI-7220-bug-wrong-port
Jul 9, 2026
Merged

fix(dash): detect rocm serve's default port in chat auto-detect#88
michaelroy-amd merged 1 commit into
mainfrom
EAI-7220-bug-wrong-port

Conversation

@fredespi

@fredespi fredespi commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • rocm serve starts vLLM on its own default port (11435, rocm_core::DEFAULT_LOCAL_PORT), but the dash chat tab's TCP-probe fallback (used when no ManagedServiceRecord exists, i.e. rocm serve without --managed) only checked :8000 (vLLM's own default) and :13305 (Lemonade).
  • Extends the fallback probe list to include port 11435, mirrored as a local constant (rocm-dash-tui deliberately carries no rocm-core dependency, same pattern already used in serve_wizard.rs), and updates the two UI copy strings that hardcoded the old port list so they stay in sync.

Test plan

  • cargo test passes for rocm-dash-tui
  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo fmt --check passes

The TUI chat's local-engine TCP-probe fallback only checked Lemonade's
:13305 and vLLM's :8000, so it never found vLLM instances started via
`rocm serve <model> --engine vllm` in non-managed mode, which listen
on rocm-serve's own default port :11435.

Add :11435 as a third probe candidate and update the UI copy that
hardcoded the old two-port list.

EAI-7220

Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
@fredespi
fredespi marked this pull request as ready for review July 8, 2026 11:54

@michaelroy-amd michaelroy-amd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — Approve ✅

Small, correct, well-scoped fix. Core claims verified against the codebase.

Verified

  • Port value is correct: rocm_core::DEFAULT_LOCAL_PORT = 11_435 (crates/rocm-core/src/lib.rs:65) — the mirrored literal matches exactly.
  • No-dependency rationale is real: rocm-dash-tui/Cargo.toml genuinely has no rocm-core dep, so duplicating the literal (with a comment pointing back to the source of truth) is consistent with the existing pattern in serve_wizard.rs.
  • Detect path is clean: detect_local_chatdetect_local_endpointdetected_llm_config (llm.rs:171), which carries only base_url/model/auth (no engine classification), so surfacing :11435 here needs nothing more.
  • llm:: tests pass; UI copy strings updated in lockstep; doc-comment first paragraph stays short (respects the repo's too_long_first_doc_paragraph clippy lint).

Notes (non-blocking)

LOW — latent engine-inference gap. auto_config_change (skills.rs:227) infers default_engine only from LEMONADE_PORT/VLLM_PORT; a :11435 endpoint would fall into the else"local", even though rocm serve is vLLM. This is not on this PR's path, and auto_config_plan/auto_config_change currently have no runtime caller (tests only), so it's dormant — not a regression. Since this PR establishes ":11435 = vLLM", adding an ROCM_SERVE_PORT arm there would prevent the two mappings from drifting when that skill is eventually wired up. Fine to defer.

LOW — test isolation. detect_local_endpoint_probes_rocm_serve_default_port skips if :11435 is already bound, but doesn't guard against :13305/:8000 being occupied on the test host. Since the probe returns the first reachable endpoint in order, a stray listener on those ports would make the assert_eq! fail rather than skip. Low real-world risk in CI; the skip-on-bind instinct is right.

@michaelroy-amd
michaelroy-amd added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit ede350f Jul 9, 2026
15 checks passed
@michaelroy-amd
michaelroy-amd deleted the EAI-7220-bug-wrong-port branch July 9, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants